

package jetbrains.buildServer.server.rest.helpers;

import jetbrains.buildServer.server.rest.util.BeanContext;
import jetbrains.buildServer.serverSide.auth.AccessChecker;
import jetbrains.buildServer.serverSide.auth.Permission;
import org.jetbrains.annotations.NotNull;

public final class AuthorityHelper {
  private AuthorityHelper() {
  }

  public static void checkGlobalPermission(@NotNull final BeanContext serviceLocator, @NotNull final Permission... permissions) {
    serviceLocator.getSingletonService(AccessChecker.class).checkHasGlobalPermission(permissions);
  }
}